import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import lang from 'element-ui/lib/locale/lang/zh-CN'
import './assets/themes/custom/theme/index.css'
import './assets/global.css'
import qs from 'qs'
//处理IE兼容性问题
import 'babel-polyfill'


import axios from 'axios';

import BianmabaStore from "./bianmaba-exteneds/plugins/bianmaba-store";
import BianmabaAuth from "./bianmaba-exteneds/plugins/bianmaba-auth"
import utils from "./bianmaba-exteneds/modules/utils"

//配全局属性配置，在任意组件内可以使用this.$qs获取qs对象
Vue.prototype.$qs = qs
Vue.prototype.axios = Vue.prototype.$axios = axios;
Vue.use(utils)
Vue.use(ElementUI, {lang})

Vue.use(BianmabaStore)
Vue.use(BianmabaAuth, {loginUrl: "oauth/token", router})

Vue.config.devtools = true
Vue.config.productionTip = true

axios.defaults.baseURL = 'http://10.28.1.252:8303';
axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest';
axios.defaults.headers['Authorization'] = 'Bearer 92e45131-d487-4a93-b000-2166fe0c418d';

new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
})
